<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			window.onload = function()
			{
				let btn = document.querySelector('button');
				let i = 60;
				let timer;
				btn.onclick = function()
				{	
					i = 60;
					btn.disabled = true;
					btn.innerHTML = `验证码发送中(60)`;
					timer = window.setInterval(function(){
						i--;
						btn.innerHTML = `验证码发送中(${i})`;
						
						
						if(i == 0)
						{
							btn.disabled = false;
							btn.innerHTML = '发送验证码';
							clearInterval(timer);	
						}
					}, 100);
				}
			}
		</script>
	</head>
	<body>
		<button>发送短信验证码</button>
	</body>
</html>